import React from 'react';

export default class Constructor extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      value: 123,
      text: "这是一段文案",
    };
  }

    handleClick = () => {
      console.log(`type this ` + typeof this);
        console.log(this.state);
  };

  render() {
    const { value, text } = this.state;
    return (
      <>
        <div>{value}</div>
            <div>{text}</div>
            <button onClick={this.handleClick}>clcik me</button>
      </>
    );
  }
}